﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/MasterPages/Dialog.Master" AutoEventWireup="true" CodeBehind="BaseInfoImportConfirm.aspx.cs" Inherits="DMS.Web.Modules.ArchivesManagement.BaseInfoImportConfirm" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="diy" %>
<%@ Register Src="~/Common/Controls/Loading.ascx" TagName="Loading" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="server">
    导入信息确认
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainHolder" runat="server">

<script type="text/javascript">
    function getClientIds() {
        return {
            btnSearch: '#<%= btnSearch.ClientID %>',
            ErrorCount: '#<%= ErrorCount.ClientID %>',
            WarningCount: '#<%= WarningCount.ClientID %>'
        };
    }
    var batchId = '<%=Request.QueryString["batchId"] %>'; 
</script>
<script type="text/javascript" src="/Modules/ArchivesManagement/Scripts/BaseInfoImportConfirm.js"></script>
<script type="text/javascript">
    window.onunload = removeAll;
</script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <fieldset>
    <legend>
        检查结果
    </legend>

    <div id="divContent" style="padding-top: 5px;" runat="server">
        <table cellpadding="1" cellspacing="2" border="0" class="orderformitem" width="99.7%">
            <tr>
                <th>
                    <nobr>
                        总记录数：
                    </nobr><b><asp:Label ID="TotalCount" runat="server" style="color:Blue;"></asp:Label></b>
                </th>
                <td>
                    
                </td>
            </tr>
            <tr>
                <th>
                    <nobr>
                        错误记录数：
                    </nobr> <b><asp:Label ID="ErrorCount" runat="server" style="color:red;"></asp:Label></b>
                </th>
                <td>
                   
                </td>
                <th>
                    <nobr>
                        警告记录数：
                    </nobr><b><asp:Label ID="WarningCount" runat="server" style="color:red;"></asp:Label></b>
                </th>
                <td>
                   
                </td>
            </tr>
           <tr>
                <td colspan="4">
                <b style="color: blue">说明</b>：<br />
                1.红色背景的记录为错误记录，黄色背景为警告记录；<br />
                2.社保号为基本信息的唯一标识，不允许重复，若重复则为错误记录，错误记录必须修正方可提交；<br/>
                3.单位名称、纳税编码若发生重复，将标为警告记录，若确认没问题，仍可提交；<br/>
                4.双击列表可打开对应行记录进行编辑，以便修正记录。
                </td>
           </tr>
    </table></div>
    </fieldset>
    <div>
        <asp:LinkButton CssClass="linkbtn _searchBtn" ID="btnSearch" OnClick="btnSearch_Click" runat="server" style="display:none"><span>查询</span></asp:LinkButton>
     <!----------- 数据列表 ------------------>
            <asp:GridView ID="baseInfoList" runat="server" class="dg_borderstyle" AutoGenerateColumns="False" 
                CellPadding="0" CellSpacing="1" border="0" ShowHeaderWhenEmpty="true" OnRowCommand="DealCommand" 
                AlternatingRowStyle-CssClass="dg_itemstyle"
                RowStyle-CssClass="dg_itemstyle" onrowdatabound="baseInfoList_RowDataBound">
                <HeaderStyle CssClass="dg_headerstyle"></HeaderStyle>
                <Columns>
                    <asp:TemplateField ItemStyle-Width="1px">
                        <ItemTemplate>
                           <div class="AlarmLevel" style="display: none"><%#Eval("AlarmLevel") %></div>
                           <div class="BaseInfoID" style="display: none"><%#Eval("BaseInfoID") %></div>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-Width="20px" Visible="true">
                        <HeaderTemplate>
                            <%--<input id="chkHeader" type="checkbox" onclick="SelectAll();"  />--%>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <input id="chkItem" class="_selectItem" runat="server" type="checkbox" value='<%# DataBinder.Eval(Container, "DataItem.BaseInfoID").ToString()%>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:HyperLinkField DataNavigateUrlFields="BaseInfoID,Type" DataNavigateUrlFormatString="/Modules/ArchivesManagement/BaseInfoForm.aspx?id={0}&action=View&baseInfoType={1}"
                        DataTextField="BoxCode" HeaderText="档案盒编号" Target="_blank" SortExpression="BoxCode"/>
                    <asp:BoundField DataField="BoxPosition" HeaderText="档案盒所在位置" SortExpression="BoxPosition"/>
                    <%--<asp:BoundField DataField="InsuranceCode" HeaderText="单位社保号" SortExpression="InsuranceCode"/>--%>
                    <asp:TemplateField HeaderText="单位社保号">
                        <ItemTemplate>
                          <div class="tdLabel" id="InsuranceCode"><%#Eval("InsuranceCode") %></div>
                          <asp:TextBox ID="InsuranceCode" runat="server" style="display: none" class="tdTextBox"></asp:TextBox> 
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="单位名称">
                        <ItemTemplate>
                          <div class="tdLabel" id="UnitName"><%#Eval("UnitName") %></div>
                          <asp:TextBox ID="UnitName" runat="server"  style="display: none" class="tdTextBox"></asp:TextBox> 
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="纳税编码">
                        <ItemTemplate>
                            <div class="tdLabel" id="TaxCode"><%#Eval("TaxCode") %></div>
                          <asp:TextBox ID="TaxCode" runat="server" style="display: none" class="tdTextBox"></asp:TextBox> 
                        </ItemTemplate>
                    </asp:TemplateField>
                    <%--<asp:BoundField DataField="UnitName" HeaderText="单位名称" SortExpression="UnitName"/>
                    <asp:BoundField DataField="TaxCode" HeaderText="纳税编码" SortExpression="TaxCode"/>--%>
                    <asp:BoundField DataField="PayUnitType" HeaderText="缴费单位类型" SortExpression="PayUnitType"/>
                    <asp:BoundField DataField="RegistDate" HeaderText="社保登记日期" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" SortExpression="RegistDate"/>
                    <asp:BoundField DataField="InsuranceCount" HeaderText="参保人数" />                                      
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <%--<a href='<%#"javascript:openForm(\"Edit\",\"" + Eval("BaseInfoID") + "\",\""+ Eval("Type")+"\")"%>'><span>编辑</span></a>--%>
                            <asp:LinkButton CommandArgument='<%#Eval("BaseInfoID") %>' OnClientClick="return deleteConfirm();" CommandName="DeleteBaseInfo" runat="server" ID="btnDelete"><span>移除</span></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <!--分页-->
            <table width="100%">
                <tr>                    
                    <td Width="85%">
                        <diy:AspNetPager ID="pager" runat="server" AlwaysShow="true" OnPageChanged="pager_PageChanged"
                            Width="100%" ShowPageIndexBox="Always" PageIndexBoxType="TextBox" TextBeforePageIndexBox="转到"
                            TextAfterPageIndexBox="页" ShowCustomInfoSection="Left" CustomInfoHTML="总数：%RecordCount%，共 %PageCount% 页，当前为第%CurrentPageIndex%页"
                            HorizontalAlign="right" FirstPageText="首页" PrevPageText="上页" NextPageText="下页"
                            LastPageText="末页" CssClass="dg_pagestyle" PageSize="15">
                        </diy:AspNetPager>    
                    </td>
                    <td Width="15%">，每页<asp:TextBox ID="PageSize" runat="server" style="width: 30px" Text="15" onblur="CheckPageSize(this)"></asp:TextBox>条记录。</td>
                </tr>
            </table>
            <div id="loading" style="display:none">
	            <table><tr><td><img src='/Themes/Default/images/loading.gif'/></td>
                <td style="word-break:keep-all; background-color:">数据处理中...</td></tr>
                </table>
            </div>
    </div>
    </ContentTemplate>
    <Triggers>
        <%--<asp:PostBackTrigger ControlID="lbtnAddMember" />
        <asp:PostBackTrigger ControlID="lbtnExport" />--%>
    </Triggers>
    </asp:UpdatePanel>             
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
        DynamicLayout="true">
        <ProgressTemplate>
            <uc1:Loading ID="Loading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Content>

<asp:Content ID="ctFooter"  ContentPlaceHolderID="FooterHolder" runat="server">
<asp:LinkButton ID="btnSave" CssClass="linkbtn" runat="server" OnClick="btnSave_Click" OnClientClick="return Check();"
        CausesValidation="true"><span>保存</span></asp:LinkButton>&nbsp;&nbsp;
<a href="javascript:if(confirm('当前数据尚未保存，是否关闭窗口？'))window.close();" class="linkbtn"><span>关闭</span></a>
</asp:Content>